import { post, get, fileDownload } from '@/utils/request/index';
import ApiUrl from '@/api/url';

// 获取任务列表
export async function getTaskList(parms: any) {
  const rtn = (await post(ApiUrl.getTaskList, parms)) as any;
  return rtn.data;
}

// 创建任务
export async function createTask(parms: any) {
  const rtn = (await post(ApiUrl.createTask, parms)) as any;
  return rtn.data;
}

// 获取任务类型列表
export async function getTaskTypeList(parms: any) {
  const rtn = (await post(ApiUrl.getTaskTypeList, parms)) as any;
  return rtn.data || [];
}

// 获取任务id列表
export async function getTaskIdList(parms: any = {}) {
  const rtn = (await get(ApiUrl.getTaskIdList, parms)) as any;
  return rtn.data || [];
}

// 生成总览数据任务专属(从account_bank_info获取)-获取账号信息下拉接口
export async function getAccountForOverview(parms: any = {}) {
  const rtn = (await post(ApiUrl.getAccountForOverview, parms)) as any;
  return rtn.data || [];
}